package com.gaotong.science.service.impl;

import com.gaotong.science.entity.History;
import com.gaotong.science.mapper.HistoryMapper;
import com.gaotong.science.service.HistoryService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author suouyang
 * @since 2021-11-02
 */
@Service
public class HistoryServiceImpl extends ServiceImpl<HistoryMapper, History> implements HistoryService {

    @Autowired
    HistoryService historyService;
    @Override
    public void save1(String url) {
        String[] split = url.split("-");
       String time=split[0]+"-"+split[1];
        History history = new History();
        history.setTime(time);
        history.setName(url);
        historyService.saveOrUpdate(history);
        }



}
